package com.exer.basic.sort;

/**
 * Java程序的初始化顺序是
 * 父类静态变量->父类静态代码块->子类静态变量->子类静态代码块
 * ->父类非静态变量->父类非静态代码块->父类构造方法
 * ->子类非静态变量->子类非静态代码块->子类构造方法
 */
public class Derived extends Base {

    static {
        System.out.println("Derived static block 静态代码块");
    }

    {
        System.out.println("Derived block 非静态代码块");
    }

    private static final String child  = "孩子";
    public Derived() {
        System.out.println("Derived constructor 构造函数");
    }

    public static void main(String[] args) {

        Derived derived = new Derived();
    }
}
